{:W('Cate/header')}
{:W('Cate/left')}

<!--内容部分-->
<div class="content">
    <div class="title">
        <p>客户管理</p>
        <i class="icon-angle-right"></i>
        <p class="active1"><a href="{:U('Client/client')}" style="color:#515974">客户列表</a></p>
        <i class="icon-angle-right"></i>
        <p class="active">订单详情</p>
    </div>
    <div style="width:100%;padding:0 10px;">
        <div class="main_title2">
            <ul class="clearfix">
                <li>
                    <span >{$_GET['name']}</span> / 客户名称
                </li>
                <li style="line-height:20px;">
                    <em style="font-size: 30px;color:#06b216;">{$_GET['usernum']}</em> / 用户数
                </li>
                <li style="line-height:20px;">
                    <em style="font-size: 30px;color:#06b216;">{$_GET['devnum']}</em> / 设备数
                </li>
            </ul>
        </div>
    </div>
    <div class="admin_list clearfix">
        <div class="main">
            <div class="main_list_menu">
                <a href="{:U('Client/client_xq',array('companyId'=>$_GET['companyId'],'name'=>$_GET['name'],'devnum'=>$_GET['devnum'],'usernum'=>$_GET['usernum']))}">用户详情</a>
                <a href="{:U('Client/client_xq2',array('companyId'=>$_GET['companyId'],'name'=>$_GET['name'],'devnum'=>$_GET['devnum'],'usernum'=>$_GET['usernum']))}">设备详情</a>
                <a href="{:U('Client/client_xq3',array('companyId'=>$_GET['companyId'],'name'=>$_GET['name'],'devnum'=>$_GET['devnum'],'usernum'=>$_GET['usernum']))}" class="active">订单详情</a>
            </div>
            <div class="main_list">
                <div class="main_list_list user_list">
                    <dl>
                        <dt>
                            <span style="width:5%">序号</span>
                            <span style="width:20%">收费模式</span>
                            <span style="width:15%">服务数量</span>
                            <span style="width:15%">服务时间</span>
                            <span style="width:15%">开通时间</span>
                            <span style="width:15%">到期时间</span>
                            <span style="width:15%">服务状态</span>
                        </dt>
                        <volist name="array['companys']" id='row' key="k">
                            <dd>
                                <span style="width:5%">{$k}</span>
                                <span style="width:20%">
                            <if condition="$row['paymode'] eq 0">
                                        免费测试
                                    <elseif condition="$row['paymode'] eq 1"/>
                                         通道授权
                                </if>
                            </span>
                                <span style="width:15%;">{$row['servicecount']}</span>
                                <span style="width:15%">
                                <if condition="$row['serviceduration'] eq 0">
                                    3天
                                    <elseif condition="$row['serviceduration'] eq 1"/>
                                    1月
                                    <elseif condition="$row['serviceduration'] eq 2"/>
                                    6月
                                    <elseif condition="$row['serviceduration'] eq 3"/>
                                    1年
                                    <elseif condition="$row['serviceduration'] eq 4"/>
                                    2年
                                    <elseif condition="$row['serviceduration'] eq 99"/>
                                    不存在
                                </if>
                                </span>
                                <span style="width:15%">
                                {$row['servicestarttime']|date="Y-m-d H:i:s",###}
                                </span>
                                <span style="width:15%">
                                {$row['servicestarttime']|date="Y-m-d H:i:s",###}
                                </span>
                                <span style="width:15%" class="clolrS active">
                                <if condition="$row['servicestatus'] eq 0">
                                        进行中
                                    <elseif condition="$row['servicestatus'] eq 1"/>
                                        <i style="color: #5b6175">已过期</i>
                                </if>
                                </span>
                            </dd>
                        </volist>
                    </dl>
                </div>
            </div>
            <div class="fy" id="page"></div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    layui.use('laypage', function(){
        var laypage = layui.laypage;

        //执行一个laypage实例
        laypage.render({
            elem: 'page'
            ,count: "<?php echo $totnum; ?>"
            ,limit: "<?php echo $pagecount; ?>"
            ,layout: ['prev', 'page', 'next', 'limit', 'skip']
            ,curr:function(){
                var page = location.search.match(/pageid=(\d+)/);
                return page ? page[1] : 1;
            }()
            ,jump: function(obj,first){  //点击页码出发的事件
                if(first!=true){  //是否首次进入页面
                    var companyId = "<?php echo $param['companyId']; ?>";
                    var name = "<?php echo $param['name']; ?>";
                    var usernum = "<?php echo $param['usernum']; ?>";
                    var devnum = "<?php echo $param['devnum']; ?>";
                    var _url = "/client/client_xq3?pageid="+obj.curr+"&pagecount="+obj.limit+"&companyId="+companyId+'&name='+name+'&usernum='+usernum+'&devnum='+devnum;
                    window.location.href = _url;
                }
            }
        });
    });
</script>
</html>